package com.mbcn.system.commonUtil;

import java.util.Map;

import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;

import org.apache.struts2.interceptor.ServletRequestAware;
import org.apache.struts2.interceptor.ServletResponseAware;
import org.apache.struts2.interceptor.SessionAware;

import com.opensymphony.xwork2.ActionSupport;
import com.opensymphony.xwork2.ModelDriven;
//*****************************************************************************
//* ALL RIGHTS RESERVED. COPYRIGHT (C) 2013 ソリマチ株式会社              			      *
//*****************************************************************************
//* File Name    : BaseUserAction.java                     					  *
//* Function     : BaseUserAction System            						  *
//* System Name  :                                 							  *
//* Create       : VanTrung 2013/07/1                                         *
//* Update       :                                                            *
//* Comment      :                                                            *
//*****************************************************************************

public abstract class BaseUserAction extends ActionSupport implements
		ServletRequestAware, ServletResponseAware, SessionAware,
		ModelDriven<Object> {
	private static final long serialVersionUID = 1L;
	protected HttpServletRequest request;
	protected HttpServletResponse response;
	protected Map<String, Object> session;
	protected Map<String, String> listMap;

	public Map<String, String> getListMap() {
		return listMap;
	}

	public void setListMap(Map<String, String> listMap) {
		this.listMap = listMap;
	}
	
	public void setSession(Map<String, Object> session) {
		this.session = session;
		if (session.get("languageId") == null) {
			session.put("languageId", 1);
		}
	}

	public void setServletResponse(HttpServletResponse response) {
		this.response = response;
	}

	public void setServletRequest(HttpServletRequest request) {
		this.request = request;
	}

}
